import Cesium from '../Ces/Cesium'
import WeUniform from './WeUniform'

class WeVolumeUniform {
    _weUniform
    _showGrid = false
    constructor() {
        const floatUniform = {
            volumeFilterMin: -99999.0,
            volumeFilterMax: 999999.0,
            filterGap: 0.0,
            alphaFuncValue: 0.02,
            numIteration: 200.0,
            topAlpha: 1.0,
            filterGapFactor: 10.0,
        }

        const vec2Uniform = {
            clipMinMaxX: new Cesium.Cartesian2(0, 1),
            clipMinMaxY: new Cesium.Cartesian2(0, 1),
            clipMinMaxZ: new Cesium.Cartesian2(0, 1),
        }

        this._weUniform = new WeUniform({
            floatUniform,
            vec2Uniform,
            name: 'WeVolumeUniform'
        })
    }

    get weUniform() {
        return this._weUniform
    }

    get showGrid() {
        return this._showGrid
    }

    set showGrid(value) {
        this._showGrid = value
    }

    get topAlpha() {
        return this._weUniform.Properties.topAlpha
    }

    set topAlpha(value) {
        this._weUniform.Properties.topAlpha = value
    }

    get filterGapFactor() {
        return this._weUniform.Properties.filterGapFactor
    }

    set filterGapFactor(value) {
        this._weUniform.Properties.filterGapFactor = value
    }

    get alphaFuncValue() {
        return this._weUniform.Properties.alphaFuncValue
    }
    set alphaFuncValue(value) {
        this._weUniform.Properties.valphaFuncValue = value
    }

    get numIteration() {
        return this._weUniform.Properties.numIteration
    }
    set numIteration(value) {
        this._weUniform.Properties.numIteration = value
    }

    get filterGap() {
        return this._weUniform.Properties.filterGap
    }

    set filterGap(value) {
        this._weUniform.Properties.filterGap = value
    }

    get filterMax() {
        return this._weUniform.Properties.volumeFilterMax
    }
    set filterMax(value) {
        this._weUniform.Properties.volumeFilterMax = value
    }
    get filterMin() {
        return this._weUniform.Properties.volumeFilterMin
    }
    set filterMin(value) {
        this._weUniform.Properties.volumeFilterMin = value
    }

    get clipMinX() {
        return this._weUniform.Properties.clipMinMaxX.x
    }
    set clipMinX(value) {
        this._weUniform.Properties.clipMinMaxX.x = value
    }

    get clipMaxX() {
        return this._weUniform.Properties.clipMinMaxX.y
    }
    set clipMaxX(value) {
        this._weUniform.Properties.clipMinMaxX.y = value
    }

    get clipMinY() {
        return this._weUniform.Properties.clipMinMaxY.x
    }
    set clipMinY(value) {
        this._weUniform.Properties.clipMinMaxY.x = value
    }

    get clipMaxY() {
        return this._weUniform.Properties.clipMinMaxY.y
    }
    set clipMaxY(value) {
        this._weUniform.Properties.clipMinMaxY.y = value
    }

    get clipMinZ() {
        return this._weUniform.Properties.clipMinMaxZ.x
    }
    set clipMinZ(value) {
        this._weUniform.Properties.clipMinMaxZ.x = value
    }

    get clipMaxZ() {
        return this._weUniform.Properties.clipMinMaxZ.y
    }
    set clipMaxZ(value) {
        this._weUniform.Properties.clipMinMaxZ.y = value
    }
}

export default WeVolumeUniform
